0 CpxTRS
↳1 DependencyGraphProof (BOTH BOUNDS(ID, ID), 0 ms)
↳2 CpxTRS
↳3 TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID), 0 ms)
↳4 CpxWeightedTrs
↳5 CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID), 0 ms)
↳6 CpxWeightedTrs
↳7 TypeInferenceProof (BOTH BOUNDS(ID, ID), 0 ms)
↳8 CpxTypedWeightedTrs
↳9 CompletionProof (UPPER BOUND(ID), 0 ms)
↳10 CpxTypedWeightedCompleteTrs
↳11 CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID), 0 ms)
↳12 CpxRNTS
↳13 CompleteCoflocoProof (⇔, 42 ms)
↳14 BOUNDS(1, 1)
*(i(x), x) → 1
*(1, y) → y
*(x, 0) → 0
*(*(x, y), z) → *(x, *(y, z))
*(i(x), x) → 1
*(x, 0) → 0
*(1, y) → y
*(i(x), x) → 1 [1]
*(x, 0) → 0 [1]
*(1, y) → y [1]
* => times |
times(i(x), x) → 1 [1]
times(x, 0) → 0 [1]
times(1, y) → y [1]
times(i(x), x) → 1 [1]
times(x, 0) → 0 [1]
times(1, y) → y [1]
times :: i:1:0 → i:1:0 → i:1:0 i :: i:1:0 → i:1:0 1 :: i:1:0 0 :: i:1:0 |
times(v0, v1) → null_times [0]
null_times
Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules:
The TRS has the following type information:
Rewrite Strategy: INNERMOST |
1 => 1
0 => 0
null_times => 0
times(z, z') -{ 1 }→ y :|: z = 1, y >= 0, z' = y
times(z, z') -{ 1 }→ 1 :|: z' = x, x >= 0, z = 1 + x
times(z, z') -{ 1 }→ 0 :|: x >= 0, z = x, z' = 0
times(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
eq(start(V, V1),0,[times(V, V1, Out)],[V >= 0,V1 >= 0]). eq(times(V, V1, Out),1,[],[Out = 1,V1 = V2,V2 >= 0,V = 1 + V2]). eq(times(V, V1, Out),1,[],[Out = 0,V3 >= 0,V = V3,V1 = 0]). eq(times(V, V1, Out),1,[],[Out = V4,V = 1,V4 >= 0,V1 = V4]). eq(times(V, V1, Out),0,[],[Out = 0,V5 >= 0,V6 >= 0,V = V5,V1 = V6]). input_output_vars(times(V,V1,Out),[V,V1],[Out]). |
CoFloCo proof output:
Preprocessing Cost Relations
=====================================
#### Computed strongly connected components
0. non_recursive : [times/3]
1. non_recursive : [start/2]
#### Obtained direct recursion through partial evaluation
0. SCC is partially evaluated into times/3
1. SCC is partially evaluated into start/2
Control-Flow Refinement of Cost Relations
=====================================
### Specialization of cost equations times/3
* CE 3 is refined into CE [7]
* CE 4 is refined into CE [8]
* CE 6 is refined into CE [9]
* CE 5 is refined into CE [10]
### Cost equations --> "Loop" of times/3
* CEs [7] --> Loop 5
* CEs [8,9] --> Loop 6
* CEs [10] --> Loop 7
### Ranking functions of CR times(V,V1,Out)
#### Partial ranking functions of CR times(V,V1,Out)
### Specialization of cost equations start/2
* CE 2 is refined into CE [11,12,13]
### Cost equations --> "Loop" of start/2
* CEs [13] --> Loop 8
* CEs [11,12] --> Loop 9
### Ranking functions of CR start(V,V1)
#### Partial ranking functions of CR start(V,V1)
Computing Bounds
=====================================
#### Cost of chains of times(V,V1,Out):
* Chain [7]: 1
with precondition: [V=1,V1=Out,V1>=0]
* Chain [6]: 1
with precondition: [Out=0,V>=0,V1>=0]
* Chain [5]: 1
with precondition: [Out=1,V=V1+1,V>=1]
#### Cost of chains of start(V,V1):
* Chain [9]: 1
with precondition: [V>=0,V1>=0]
* Chain [8]: 1
with precondition: [V=V1+1,V>=1]
Closed-form bounds of start(V,V1):
-------------------------------------
* Chain [9] with precondition: [V>=0,V1>=0]
- Upper bound: 1
- Complexity: constant
* Chain [8] with precondition: [V=V1+1,V>=1]
- Upper bound: 1
- Complexity: constant
### Maximum cost of start(V,V1): 1
Asymptotic class: constant
* Total analysis performed in 39 ms.